home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Nave / spaceambush.swf / scripts / frame_286 / PlaceObject2_663_120 / CLIPACTIONRECORD onClipEvent(load).as < prev   
Encoding:
Text File  |  2007-03-12  |  599 b   |  18 lines

  1. onClipEvent(load){
  2.    timer = 0;
  3.    rv = random(40);
  4.    if(String(_name) != "kartus")
  5.    {
  6.       cannonLength = 10;
  7.       turretpoint = _parent.tank._rotation + _parent.tank.turret._rotation + 90;
  8.       angle = turretpoint / 360 * 2 * 3.141592653589793;
  9.       xcomponent = cannonLength * Math.sin(angle);
  10.       ycomponent = (- cannonLength) * Math.cos(angle);
  11.       _X = xcomponent + _parent.tank._x;
  12.       _Y = ycomponent + _parent.tank._y;
  13.       xmove = xcomponent / cannonLength * 10;
  14.       ymove = ycomponent / cannonLength * 10;
  15.       this._rotation = turretpoint - 90;
  16.    }
  17. }
  18.